package org.jeecg.modules.app.handler;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.app.body.ParamMap;
import org.jeecg.modules.app.utils.JsonUtil;

/**
 * @ClassName UserHandler
 * @Version V1.0
 */
public class UserHandler extends BaseHandler {

    private String token;

    public UserHandler(String token) {
        this.token = token;
    }

    @Override
    public JSONObject checkApi(ParamMap paramMap, String method) throws Exception {
        switch (method) {
            case "login":
                return login(paramMap);
            default:
                return JsonUtil.errorJson("请求地址无效");
        }
    }


    private JSONObject login(ParamMap paramMap) {

        return JsonUtil.successJson(null, "登录成功");
    }
}
